

module.exports = app => {
		const DataTypes = app.Sequelize;
	
		const Activitys = app.model.define('activitys', {
			id: {
				type: DataTypes.INTEGER,
				allowNull: false,
				autoIncrement: true,
				primaryKey: true,
				comment: "活动id",
			},
			title: {
				type: DataTypes.STRING,
				allowNull: true,
				comment: "活动标题",
			},
			type: {
				type: DataTypes.INTEGER,
				allowNull: true,
				defaultValue: 0,
				comment: "活动类型【0-限时精选，1-热门推荐..】",
			},
			discount: {
				type: DataTypes.DECIMAL(3, 2),
				defaultValue: 1.00,
				comment: "活动折扣",
			},
			sort: {
				type: DataTypes.INTEGER,
				defaultValue: 0,
				allowNull: true,
				comment: "活动排序",
			},
			createdAt: {
				type: DataTypes.DATE,
				allowNull: true,
				comment: "创建时间",
			},
			updatedAt: {
				type: DataTypes.DATE,
				allowNull: true,
				comment: "更新时间",
			}
		}, {
			tableName: 'activitys'
		});
	
		Activitys.associate = function() {
	
		}
	
		return Activitys;
	};
	